from django.db import models

# Create your models here.
from categories.models import Category
class Products(models.Model):
	name = models.CharField(max_length=120)
	slug = models.SlugField(unique=True)
	description = models.CharField(max_length=500, blank=True,null=True)
	image1=models.ImageField(upload_to='product_images',blank=True,null=True)
	price = models.IntegerField(blank=False,null=False)
	inventory = models.IntegerField(blank=False,null=False)
	product_category = models.ManyToManyField(Category)
	def __unicode__(self):
		return self.name
	class Meta:
		ordering= ['-id']
		verbose_name = ('product')
		verbose_name_plural = ('Products')

